using System;
using System.Collections.Generic;

using ZoneFiveSoftware.Common.Data.Fitness;
using ZoneFiveSoftware.Common.Data.GPS;
using ZoneFiveSoftware.Common.Visuals;
using ZoneFiveSoftware.Common.Visuals.Fitness;

namespace BENBUN.WIW
{
    class ExtendActions : IExtendActivityExportActions
    {
        #region IExtendActivityExportActions Members

        IList<IAction> IExtendActivityExportActions.GetActions(IList<IActivity> activities)
        {
            return new IAction[] { new ExportActivityToWIW(activities) };
        }

        IList<IAction> IExtendActivityExportActions.GetActions(IActivity activity)
        {
            if (activity == null || activity.GPSRoute == null || activity.GPSRoute.Count == 0) return null;
            if (activity.StartTime > DateTime.Now) return null;

            return new IAction[] { new ExportActivityToWIW(new IActivity[] { activity }) };

        }

        #endregion
    }

}
